package file;

import java.io.File;
import java.io.IOException;

public class FileDemo
{
    public static void main(String[] args) throws IOException
    {
        File file = new File("demo.txt");
        System.out.println(file.length());
        System.out.println(file.getName());
        System.out.println("可读 ：  "+file.canWrite());
        System.out.println("可写 ： " + file.canRead());
        System.out.println(file.canExecute());
        System.out.println(file.getCanonicalPath());
        System.out.println(file.isDirectory());
        System.out.println("隐藏 ：" + file.isHidden());


    }
}
